import { ref, reactive, toRefs } from "@vue/composition-api";

export const useMousePosition = () => {
    let pos = reactive({
        x: 0,
        y: 0,
    });

    window.addEventListener("mousemove", (e) => {
        pos.x = e.clientX;
        pos.y = e.clientY;
    });
    return pos;
};
